package com.camps.sdk.encrypt;

import com.camps.sdk.common.ExceptionCode;
import com.camps.sdk.exception.BaseException;

/**
 * @Author ldaoliang
 * @Date create in 10:11 2021/9/1
 * @Description
 */
public class GetParamCommand implements BuildCommand {
    @Override
    public String splicingParameters(String imei,Object params) {
        if(!(params instanceof String)){
            throw new BaseException(ExceptionCode.PARAMETER_ERROR);
        }
        String commandNumber = (String)params;
        StringBuilder stringBuilder = new StringBuilder("*WT,");
        stringBuilder = stringBuilder.append(imei).append(",GETPARAM,").append(commandNumber).append("#");
        return stringBuilder.toString();
    }
}
